<template>
	<view class="discussPage">
		<u-navbar title="写帖子" :safeAreaInsetTop="true" titleStyle="color:#333333;fontSize:30rpx;fontWeight:bold">
			<view slot="left" class="navbarLeft" @click="cancelPost">取消</view>
			<!-- <view slot="right" class="navBarRight" @click="republish">发布</view> -->
		</u-navbar>
		<u-status-bar></u-status-bar>
		<view class="postContent">
			<view class="postContentheader">
				<textarea :maxlength="30" v-model="title" placeholder="请输入标题（2-30个字符）" border='none' clearable
					placeholderStyle="color: #666666;fontSize: 48rpx" @input="monitorTitle"
					style="width: 100%;font-size: 48rpx"></textarea>
				<view class="topic" v-if="topicName">
					#{{topicName}}
				</view>
				<view class="cont">
					<view class="topic-title" @click="selectTopic">
						#话题
					</view>
					<view class="num">
						{{inputNum}}/30
					</view>
				</view>
			</view>
			<view class="infoContent">
				<textarea v-model="info" placeholder="来吧，想和大家分享点什么..." count maxlength="4000" border="none"
					:adjustPosition="false" :show-confirm-bar="false" @blur="leaveInput" @focus="getHeight"
					:auto-height="true" placeholder-class="placeClass" placeholderStyle="color: #999999;"
					style="width: 100%;">
				</textarea>
			</view>
			<view v-if="showShareInfo" class="shareInfo">
				<view class="itemTop">
					<view class="topRight">
						<u--image :src="shareInfo.images?($appFunc.getFileUrl(shareInfo.images.split(',')[0])):''"
							shape="square" mode="aspectFill" width="208rpx" height="150rpx" bgColor="transparent"
							radius="8rpx"></u--image>
					</view>
					<view class="topLeft">
						<view class="title">{{shareInfo.name}}</view>
						<view class="listInfo">{{shareInfo.describeDesc||shareInfo.content}}</view>
					</view>
				</view>
			</view>
			
			
			<view class="uploadContent">
				<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
					width="205rpx" height="205rpx" :maxCount="9">
					<view class="uploadIcon">
						<u-icon name="plus" size="50rpx" color="#D0D0D0FF"></u-icon>
					</view>
				</u-upload>
			</view>
			
			<view class="addlink-box">
				<view class="addlink">
					<u-button type="primary" @click="showAddLink" icon="attach" shape="circle" text="添加超链接"></u-button>
				</view>
				<view class="addfile">
					<u-button type="primary" @click="pickFile" icon="file-text-fill" shape="circle" text="添加文件"></u-button>
				</view>
			</view>
			<view class="linkbox" v-if="formLinkInfo.name">
				<view @click="goWebview">#{{ formLinkInfo.name }}#</view>
			</view>
			
			<view class="fileimage" v-if="fileUrl" @click="openFile">
				<u--image :src="getImgUrl(fileUrl).imageUrl" shape="square" mode="aspectFill" width="76rpx"
					height="76rpx">
				</u--image>
				<view class="filename">相关文档</view>
			</view>
			<view class="discussBtn" :style="[{ 'bottom':btnContentHeight -3 + 'px'}]">
				<view class="title">
					板块选择
				</view>
				<view class="plate-pannel">
					<view class="plate-item" :class="{'active': selectedModel==item.id}"
						v-for="(item,index) in modelList" :key="index" @click="selectModel(item)">
						{{item.columnName}}
					</view>
				</view>
			</view>
		</view>
		<view class="submit">
			<view class="submit-button" @click="republish">
				发布
			</view>
		</view>
		<u-popup :show="showPopup" :round="10" mode="bottom" @close="closePopup" @open="openPopup">
			<view class="popup-form">
				<u--form labelPosition="left" ref="form1">
					<u-form-item label="链接名称" prop="name" borderBottom labelWidth="100" ref="item1">
						<u--input v-model="linkInfo.name" placeholder="请填入链接显示内容" border="none"></u--input>
					</u-form-item>
					<u-form-item label="链接地址" prop="url" borderBottom labelWidth="100" ref="item1">
						<u--input v-model="linkInfo.url" placeholder="请填入完整链接地址" border="none"></u--input>
					</u-form-item>
				</u--form>
				<view class="tip">外部链接的域名需要提前配置才可以在小程序中打开</view>
				<view class="formbtn">
					<u-button type="primary" shape="circle" @click="submitLink">确定</u-button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import Tabbar from "@/components/tabbar.vue";
	import validContent from "@/utils/validateContent.js"
	import { validateText, validateImagesrc } from "@/utils/validateUtil.js"
	export default {
		components: {
			Tabbar
		},
		data() {
			return {
				api: this.$api.baseUrl,
				showModeList: false,
				title: "",
				info: "",
				fileList1: [],
				selectedModel: "",
				selectedModelTitle: "模块",
				topicId: "",
				topicName: "",
				modelList: [],
				showShareInfo: false,
				userId: "",
				btnContentHeight: 0,
				shareData: {},
				shareInfo: {},
				inputNum: 0,
				showPopup: false,
				linkInfo: {
					name: '',
					url: ''
				},
				fileUrl: '',
				formLinkInfo: {},
				isFileTriggerShow: false,
				rtext: '<a target="_blank" title="总书记考察细节里的牵挂" href="http://www.qq.com" class="c-font-medium c-color-t opr-toplist1-subtitle_3FULy"">总书记考察细节里的牵挂</a>'
				// currentChoose: ""
			}
		},
		onLoad(option) {
			if (!this.userId) {
				uni.getStorage({
					key: "userInfo",
					success: (res) => {
						console.log(res)
						let info = res.data;
						this.userId = info.id;
						
					}
				})
			}
			this.$request.get(this.$api.modelList).then(res => {
				this.modelList = res.result;
				uni.hideLoading()
			})
			this.resetFile()
		},
		onShow() {
			if (!this.userId) {
				uni.getStorage({
					key: "userInfo",
					success: (res) => {
						let info = res.data;
						this.userId = info.id;
						this.shareData = uni.getStorageSync("shareData");
						uni.removeStorage({
							key: "shareData"
						})
						if (this.shareData.id) {
							this.initData();
						}
					}
				})
				this.$request.get(this.$api.modelList).then(res => {
					this.modelList = res.result;
					uni.hideLoading()
				})
			} else if (!this.shareData.id) {
				this.shareData = uni.getStorageSync("shareData");

				if (this.shareData.id) {
					this.initData();
				}
			} else {
				this.shareData = uni.getStorageSync("shareData");
				if (this.shareData.id) {
					this.initData();
				}
			}
			this.btnContentHeight = 0;
		},
		methods: {
			resetFile() {
				this.fileUrl = '',
				this.formLinkInfo = {}
				this.$appFunc.delFile('discussfile')
			},
			showAddLink() {
				this.showPopup = true
			},
			submitLink() {
				console.log('this.linkInfo', this.linkInfo)
				if (!this.linkInfo.name) {
					uni.showToast({
						icon: "none",
						title: "请输入链接名称"
					})
					return;
				}
				if (!this.linkInfo.url) {
					uni.showToast({
						icon: "none",
						title: "请输入链接地址"
					})
					return;
				}
				if (!/^\/pages.*/.test(this.linkInfo.url) && !/^https.*/.test(this.linkInfo.url)) {
					uni.showToast({
						icon: "none",
						title: "请输入https地址或者小程序内的地址"
					})
					return;
				}
				this.formLinkInfo = JSON.parse(JSON.stringify(this.linkInfo))
				this.closePopup()
				uni.showToast({
					icon: "none",
					title: "链接添加成功！"
				})
			},
			goWebview() {
				uni.navigateTo({
					url: '/pages/webview/webview?src=' + this.linkInfo.url
				})
			},
			pickFile() {
				console.log('pickFile', wx.chooseMessageFile)
				const that = this
				const extensionList = ['xls', 'xlsx', 'doc', 'docx', 'pdf', 'txt']
				this.isFileTriggerShow = true
				wx.chooseMessageFile({
					count: 1,
					type: 'file',
					extension: extensionList,
					success(res) {
						console.log(res);
						// tempFilePath可以作为 img 标签的 src 属性显示图片
						const tempFilePaths = res.tempFiles
						const filePath = tempFilePaths[0].path
						const filename = tempFilePaths[0].name
						const fileExt = filename.split('.').pop()
						if (extensionList.indexOf(fileExt) == -1) {
							that.$appFunc.msg('文件格式不支持，目前支持:'+extensionList.join(','))
							return
						}
						that.uploadFilePromise(filePath).then(result => {
							console.log(result)
							that.fileUrl = result
						})
					},
					fail(res) {
						console.log('fail',res)
					}
				})
			},
			openFile() {
				uni.showLoading({
					title: '文件加载中',
					mask: true
				})
				let id = 'discussfile'
				let url = this.fileUrl
				this.$appFunc.openFile(id, url).then(res=> {
					uni.hideLoading()
				}).catch((e) => {
					console.log(e)
					uni.hideLoading()
					this.$appFunc.msg('打开文件失败')
				})
			},
			getImgUrl(item) {
				let that = this
				let arr = item.split(".");
				let type = arr[arr.length - 1];
				let obj = {};
				switch (type) {
					case "zip":
						obj.imageUrl = '/static/growup/2.png'
						// obj.colorIndex = 0
						break;
					case "doc":
						obj.imageUrl = '/static/growup/3.png'
						// obj.colorIndex = 2
						break;
					case "docx":
						obj.imageUrl = '/static/growup/3.png'
						// obj.colorIndex = 2
						break;
					case "pdf":
						obj.imageUrl = '/static/growup/4.png'
						// obj.colorIndex = 1
						break;
					case "xls":
						obj.imageUrl = '/static/growup/5.png'
						// obj.colorIndex = 0
						break;
					case "xlsx":
						obj.imageUrl = '/static/growup/5.png'
						// obj.colorIndex = 0
						break;
					case "ppt":
						obj.imageUrl = '/static/growup/6.png'
						// obj.colorIndex = 0
						break;
					default:
						obj.imageUrl = '/static/growup/8.png'
						// obj.colorIndex = 0
						break;
				}
				return obj
			},
			openPopup() {},
			closePopup() {
				this.showPopup = false
			},
			monitorTitle(e) {
				let that = this
				that.inputNum = e.detail.value.length
			},
			leaveInput(e) {
				this.btnContentHeight = 0;
			},
			getHeight(e) {
				if (e) {
					this.btnContentHeight = e.target.height;
				}
			},
			initData() {
				console.log('this.shareData', this.shareData)
				if (this.shareData.types === "1") {
					this.$request.get(this.$api.postDetail, {
						userId: this.userId,
						id: this.shareData.id
					}).then(res => {
						uni.hideLoading()
						this.shareInfo = res.result;
						this.showShareInfo = true;
					})
				} else if (this.shareData.types === "2") {
					this.$request.get(this.$api.getNewsDetail2, {
						id: this.shareData.id,
						userId: this.userId
					}).then(res => {
						uni.hideLoading()
						this.showShareInfo = true;
						this.shareInfo = res.result;
					})
				}  else if (this.shareData.types === "5") {
					this.$request.get(this.$api.videoCountList, {
						id: this.shareData.id,
						userId: this.userId
					}).then(res => {
						uni.hideLoading()
						this.showShareInfo = true;
						this.shareInfo = Object.assign({}, res.result, {
							name: res.result.curriculumName,
							content: res.result.curriculumDesc || ''
						});
						// console.log('this.showShareInfo4', this.showShareInfo)
					})
				}  else if (this.shareData.types === "6") {
					this.$request.get(this.$api.signupDetail, {
						id: this.shareData.id,
						userId: this.userId
					}).then(res => {
						uni.hideLoading()
						this.showShareInfo = true;
						this.shareInfo = res.result;
						console.log('this.showShareInfo3', this.showShareInfo)
					})
				}
			},
			goPostsDetail() {
				uni.navigateTo({
					url: "/pages/postDetail/postDetail?id=" + this.shareData.id
				})
			},
			republish() {
				if (!this.title) {
					uni.showToast({
						icon: "none",
						title: "请输入标题"
					})
					return;
				}
				if (this.title.length < 2) {
					uni.showToast({
						icon: "none",
						title: "请输入标题（2-30个字符）"
					})
					return;
				}
				if (!this.info) {
					uni.showToast({
						icon: "none",
						title: "请输入内容"
					})
					return;
				}
				if (this.info.length < 30) {
					uni.showToast({
						icon: "none",
						title: "内容过短至少30字,建议丰富内容后再发布",
						duration: 2500
					})
					return;
				}
				
				validateText(this.title)
				.then(res => {
					validateText(this.info)
					.then(res => {
						if (!this.selectedModel) {
							uni.showToast({
								icon: "none",
								title: "请选择模块"
							})
							return;
						}
						let imageStr = "";
						this.fileList1.map(item => {
							if (imageStr) {
								imageStr = imageStr + "," + item.url.replaceAll(this.api + '/', "")
							} else {
								imageStr = item.url.replaceAll(this.api + '/', "")
							}
						})
						this.$request.post(this.$api.republishPost, {
							userId: this.userId,
							columnId: this.selectedModel,
							columnName: this.selectedModelTitle,
							topicId: this.topicId,
							//topicName: this.topicName,
							images: imageStr,
							content: this.info,
							name: this.title,
							postsParentId: this.shareData.id || "",
							types: this.shareData.types || "",
							keyWord: this.fileUrl,
							filmName: this.formLinkInfo.name || '',
							filmUrl: this.formLinkInfo.url || ''
						}).then(res => {
							uni.hideLoading()
							this.finishPost();
							this.title = ""
							this.info = ""
							this.fileList1 = [];
							this.selectedModel = ""
							this.selectedModelTitle = "模块"
							this.topicId = ""
							this.topicName = ""
							this.resetFile()
							console.log('send',res)
							setTimeout(() => {
								if (res.result == 1) {
									uni.showToast({
										icon: "none",
										title: "发帖已提交后台审核，通过后显示",
										duration: 3000
									})
								} else {
									uni.showToast({
										icon: "success",
										title: "发帖成功",
										duration: 2000
									})
								}
							}, 500)
						})
					}).catch(err => {
						console.log('err', err)
						uni.showToast({
							icon: "none",
							title: "内容违规,请重新编辑",
							duration: 10000
						})
					})
				})
				.catch(err => {
					console.log('err', err)
					uni.showToast({
						icon: "none",
						title: "标题违规,请重新编辑"
					})
				})
				// if (!validContent(this.info) || !validContent(this.title)) {
				// 	uni.showToast({
				// 		icon: "none",
				// 		title: "内容含有违规内容,不可发布"
				// 	})
				// 	return;
				// }
				
			},
			selectModel(item) {
				this.selectedModel = item.id
				this.selectedModelTitle = item.columnName
				// this.showModeList = false;
			},
			finishPost() {
				uni.removeStorage({
					key: "shareData"
				})
				this.showShareInfo = false;
				uni.setStorageSync('isPublish', 1)
				uni.switchTab({
					url: "/pages/community/community"
				})
			},
			cancelPost() {
				// if (this.shareData.id) {
				// 	if(this.shareData.types==='1'){
				// 		uni.redirectTo({
				// 			url: "/pages/postDetail/postDetail?id=" + this.shareData.id
				// 		})
				// 	}else if(this.shareData.types==='2'){
				// 		uni.redirectTo({
				// 			url: "/pages/newsDetial/newsDetial?id=" + this.shareData.id
				// 		})
				// 	}else if(this.shareData.types==='3'){
				// 		uni.redirectTo({
				// 			url: "/pages/solutionDetial/solutionDetial?id=" + this.shareData.id
				// 		})
				// 	}
				// } else {
				uni.removeStorage({
					key: "shareData"
				})
				this.showShareInfo = false;
				uni.switchTab({
					url: "/pages/community/community"
				})
				// }
			},
			beforeRead() {
				this.isFileTriggerShow = true
			},
			async afterRead(event) {
				let lists = [].concat(event.file)
				let fileListLen = this[`fileList${event.name}`].length
				lists.map((item) => {
					this[`fileList${event.name}`].push({
						...item,
						status: 'uploading',
						message: '上传中'
					})
				})
				for (let i = 0; i < lists.length; i++) {
					const result = await this.uploadFilePromise(lists[i].url)
					validateImagesrc(result).then(res => {
						uni.hideLoading()
						let item = this[`fileList${event.name}`][fileListLen]
						this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
							status: 'success',
							message: '',
							url: result
						}))
						fileListLen++
					}).catch(err => {
						uni.hideLoading()
						uni.showToast({
							icon: "none",
							title: "图片违规,请重新选择"
						})
					})
					
				}
			},
			uploadFilePromise(url) {
				return new Promise((resolve, reject) => {
					this.$request.upload(this.$api.uploadImage, url).then(res => {
						resolve(this.$appFunc.getFileUrl(JSON.parse(res).message))
						uni.hideLoading()
					});
				})
			},
			deletePic(event) {
				this[`fileList${event.name}`].splice(event.index, 1)
			},
			selectTopic() {
				uni.navigateTo({
					url: "/pages/topic/topic"
				})
			},
			doClose() {
				this.showModeList = false
			}
		}
	}
</script>

<style lang="scss">
	.discussPage {
		background-color: #fff;
		height: 100vh;
		overflow: auto;

		.navbarLeft {
			color: #666666;
			font-size: 30rpx;
		}

		.navBarRight {
			color: #264DA1;
			font-size: 30rpx;
		}

		.postContent {
			padding: 100rpx 40rpx 0;
			padding-bottom: 200rpx;

			.postContentheader {
				display: flex;
				flex-direction: column;
				border-bottom: 1rpx solid #D0D0D0;
				padding-bottom: 16rpx;

				.topic {
					color: #264DA1;
					font-size: 26rpx;
				}

				.cont {
					display: flex;
					flex-direction: row;
					justify-content: flex-end;

					.topic-title {
						color: #264DA1;
						font-size: 26rpx;
						margin-right: 16rpx;
					}

					.num {
						color: #999999;
						font-size: 26rpx;
					}
				}
			}

			.u-input {
				height: 50rpx;
				line-height: 60rpx;
				font-size: 46rpx;

				.u-input__content__field-wrapper__field {
					height: 50rpx;
					line-height: 60rpx;
					font-size: 46rpx !important;
				}
			}

			.infoContent {
				padding-top: 20rpx;

				.placeClass {
					font-size: 32rpx;
					color: #D0D0D0;
				}

				textarea {
					// border-bottom: 1rpx solid #D0D0D0;
					width: calc(100% - 40rpx);
					padding: 20rpx 20rpx;
					min-height: 300rpx;
				}
			}

			.shareInfo {
				display: flex;
				flex-direction: column;
				background: #FFFFFF;
				box-shadow: inset 0px 0px 0px 1rpx rgba(230, 230, 230, .5);
				margin-bottom: 20rpx;
				position: relative;
				top: -2rpx;
				background-color: #F8F8F8;

				.itemTop {
					display: flex;
					flex-wrap: nowrap;
					justify-content: flex-start;

					.topLeft {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						width: 100%;
						padding-left: 20rpx;
						padding-bottom: 10rpx;

						.listInfo {
							color: #999999;
							font-size: 26rpx;
							line-height: 35rpx;
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 3;
							-webkit-box-orient: vertical;
							letter-spacing: 2rpx;
							height: 100rpx;
							font-family: PingFang SC-Regular, PingFang SC;
						}

						.title {
							padding-top: 10rpx;
							font-family: PingFang SC-Bold, PingFang SC;
							font-weight: bold;
							color: #333333;
							font-size: 28rpx;
							letter-spacing: 1rpx;
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 1;
							-webkit-box-orient: vertical;
							padding-right: 20rpx;
						}

						.talk {
							font-family: PingFang SC-Regular, PingFang SC;
							font-weight: 400;
							color: #004DA1;
							font-size: 26rpx;
							display: flex;
							flex-wrap: nowrap;
							overflow: auto;
							margin-right: 20rpx;

							.talkItem {
								flex-shrink: 0;
							}
						}
					}

					.topRight {
						flex-shrink: 0;
					}
				}
			}
			.addlink-box {
				display: flex;
				flex-direction: row;
				flex-wrap: nowrap;
				.addfile {
					margin-left: 30rpx;
				}
				.u-button--primary {
					background-image: linear-gradient(180deg, #87C5FC 0%, #247FFF 100%);
					border: none;
				}
			}
			.addlink {
				margin-top: 40rpx;
				width: 250rpx;
			}

			.addfile {
				margin-top: 40rpx;
				width: 220rpx;
			}
			.fileimage {
				margin-top: 40rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				height: 76rpx;
				.filename {
					margin-left: 20rpx;
					color: $uni-text-color-grey;
				}
			}

			.uploadContent {
				background-color: #fff;

				.u-upload__wrap {
					display: flex;
					justify-content: flex-start;
					margin-top: 20rpx;
				}

				.uploadIcon {
					width: 205rpx;
					height: 205rpx;
					background-color: #fff;
					font-size: 50rpx;
					margin: 20rpx 10rpx 0 0;
					border: 1px dashed #D0D0D0FF;
					display: flex;
					justify-content: center;
				}

				.u-upload__wrap__preview {
					margin-top: 20rpx;
				}
			}
		}

		.discussBtn {
			display: flex;
			flex-direction: column;
			// justify-content: space-between;
			border-top: 1rpx solid #D0D0D0;
			padding: 38rpx 0 0 0;
			margin-top: 40rpx;
			// margin: 0 30rpx;
			// position: fixed;
			// width: calc(100% - 80rpx);
			// height: 100rpx;
			background-color: #fff;
			z-index: 9;

			.title {
				color: #333333;
				font-size: 36rpx;
			}

			.plate-pannel {
				display: flex;
				flex-wrap: wrap;

				.plate-item {
					// min-width: 128rpx;
					height: 64rpx;
					line-height: 64rpx;
					text-align: center;
					background: #F4F4F4;
					border-radius: 8rpx;
					opacity: 1;
					margin-right: 16rpx;
					font-size: 26rpx;
					color: #333333;
					padding: 0 24rpx;
					margin-top: 28rpx;

					&.active {
						background: #E5EDFF;
						// border-radius: 8px 8px 8px 8px;
						opacity: 1;
						color: #004DA1;
					}
				}
			}

			.modelSelect {
				display: flex;
				flex-wrap: nowrap;
				justify-content: flex-start;
				align-items: center;
				border: 1px solid #F0F0F0FF;
				height: 54rpx;
				border-radius: 27rpx;
				padding: 0 20rpx;
				flex-shrink: 0;

				.title {
					padding-left: 10rpx;
					font-size: 24rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
				}
			}

			.topicText {
				color: #004DA1FF;
				font-size: 26rpx;
			}

			.navBarRight {
				flex-shrink: 0;
			}
		}

		.midelPanel {
			display: flex;
			text-align: center;
			flex-direction: column;

			.title {
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #666666;
				font-size: 28rpx;
				border-bottom: 1rpx solid #eee;
				height: 100rpx;
				line-height: 100rpx;
			}

			.cost {
				font-size: 32rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				display: flex;
				flex-wrap: nowrap;
				justify-content: center;
				border-bottom: 1rpx solid #eee;
				height: 100rpx;
				line-height: 100rpx;
			}

			.modelBtn {
				display: flex;
				justify-content: center;
				padding-top: 20rpx;

				.btn {
					height: 92rpx;
					line-height: 92rpx;
					width: 680rpx;
					font-size: 32rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					text-align: center;
					background: #F6F6F6;
					border-radius: 48rpx;
				}
			}

		}

		.submit {
			position: fixed;
			padding: 36rpx;
			padding-bottom: 66rpx;
			background: #FFFFFF;
			bottom: 0;
			left: 0;
			width: 100%;
			box-sizing: border-box;
			background: #FFFFFF;
			z-index: 999;

			.submit-button {
				height: 96rpx;
				line-height: 96rpx;
				text-align: center;
				background: linear-gradient(180deg, #87C5FC 0%, #247FFF 100%);
				border-radius: 48rpx 48rpx 48rpx 48rpx;
				opacity: 1;
				color: #FFFFFF;
				font-size: 36rpx;
			}
		}

		.popup-form {
			padding: 50rpx 50rpx 100rpx 50rpx;

			.formbtn {
				margin-top: 50rpx;
			}
			.tip {
				color: $uni-text-color-grey;
				padding-top: 30rpx;
			}
		}

		.linkbox {
			color: $uni-color-primary;
			margin-bottom: 30rpx;
			margin-top: 30rpx;
		}
	}
</style>
